package com.lineage.data.item_etcitem.quest;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.ServerBasePacket;

public class Ham extends ItemExecutor {
  public static ItemExecutor get() {
    return new Ham();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    try {
      if (item == null)
        return; 
      if (pc == null)
        return; 
      if (pc.hasSkillEffect(52788)) {
        int time = pc.getSkillEffectTimeSec(52788) / 60;
        pc.sendPackets((ServerBasePacket)new S_ServerMessage("距离下次开启汉的袋子(分):" + time));
        return;
      } 
      pc.setSkillEffect(52788, 21600000);
      pc.getInventory().storeItem(92479, 1L);
      pc.sendPackets((ServerBasePacket)new S_ServerMessage("获得:冷冽的气息"));
    } catch (Exception exception) {}
  }
}
